package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 宿舍成员
 * </p>
 *
 * @author hpiggy
 * @since 2025-03-02
 */
@Data
@TableName("dorm_room_member")
@ApiModel(value = "DormRoomMember对象", description = "宿舍成员")
public class DormRoomMember implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    @ApiModelProperty("宿舍id")
    private Long roomId;

    @ApiModelProperty("老师id")
    private Long teacherId;

    @ApiModelProperty("入住时间")
    private LocalDate startDate;

    @ApiModelProperty("截止时间")
    private LocalDate endDate;

    @ApiModelProperty("创建人id")
    private Long createdId;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField(exist = false)
    @ApiModelProperty("宿舍成员")
    private String memberName;


}
